package online.learningsp.common.valid;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.ElementType.TYPE_USE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * 用于匹配整形参数
 * @author QiuYingMu
 * @create 2024-05-11 19:19
 */

@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = {})
public @interface ParameterValid {

    String message() default "{online.learning.common.valid.EnumValidate.message}";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };

    // regexp参数
    String regexp() default "";
}
